package collection;

import java.util.ArrayList;
//import java.util.Iterator;


import map.ComparableDemo;


public class ArrayListDemo {
	public static void main(String[] args) {
		ArrayList<String> al = new ArrayList<String>();
		al.add("Vibhanshu");
		al.add("Sitanshu");
		al.add("Rajeev");
		/**in collection element traversing by to type
		 * 1- Iterator method 
		 * 2- for- each()  method
		 * */
		
/*		Iterator<String> it = al.iterator();    ----->  
		while(it.hasNext()){
			System.out.println(it.next());
		}
*/
	for (String obj:al){
		System.out.println(obj);
	}
	}

	public void add(ComparableDemo comparableDemo) {
		// TODO Auto-generated method stub
		
	}

	
}
